RFC - definition of a runner class using as much of the existing code as possible#404
RFC - definition of a runner class using as much of the existing code as possible#404syntron wants to merge 102 commits intoOpenModelica:masterfrom
Conversation
6ef0900 to
0deda10
Compare
|
Some status update on this PR - the main points are:
The code defined here updates the internal structure of OMPython such that:
Furthermore, as OMCPath is working only for Python >= 3.12, another dimension exists. There is a dummy implementation of OMCPath for Python < 3.12 such that most of the functionality can also be used here. See PR #401 for a hint that even older Python version are used (Python 3.10 or even lower). These changes could be the baseline for a new documentation (see https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html). My idea was to include these changes as 4.x.0 and create a cut at the next release (or keep some kind of compatibility layer alive). (partly from the discussion in PR #387) |
|
The failed test is due to Windows - it runs well for v4.0.0 (see: https://github.com/syntron/OMPython/actions/runs/21842400755) and 4.x.x (see: https://github.com/syntron/OMPython/actions/runs/21841418638) |
|
This is a final version of my changes to get a 'runner' functionality to OMPython. The main parts:
This PR will be splitted into smaller steps. |
be89d52 to
b20568b
Compare
OK; I will create small parts for review & merge; there are some changes on top to restructure the two main files |
Sorry I haven't got time to look into this yet. |
yes - this is the plan; the one RFC is way too big / too much changes to get an easy overview ... |
|
Summary of the changes in these RFC; the elements will be provided as single PRs. Basic concept / plan:
This means for some period of time, the new interface and the compatibility layer can exist in parallel (versions Steps for the implementation (see PRs below):
I tried to order the PRs based on the steps (A) to (H) but some will be out of order. If the PRs are merged, please try PRs based on this RFC (using the branch name in my fork syntron:OMPython as reference; I will use this comment to link the PRs step by step): (step A)
(step B)
(step C)
(step D)
(step E)
(step F)
=> status syntron_RFC step G & H are still to be reordered |
|
PRs of step A: (A001) simplify_workflow_Test - PR #411 - UPDATED moved to the end / rebase needed: The final state can be found at https://github.com/syntron/OMPython/tree/mergeA |
* use .items()
…ivate variable _model_name
* ModelicaSystemRunner & OMCPath * ModelicaSystemRunner & OMPathRunnerLocal * ModelicaSystemRunner & OMPathRunnerBash * ModelicaSystemRunner & OMPathRunnerBash using docker * ModelicaSystemRunner & OMPathRunnerBash using WSL (not tested!)
* OMCPath & OMCSessionZMQ * OMCPath & OMCSessionLocal * OMCPath & OMCSessionDocker * OMCPath & OMCSessionWSL (not tested!) * OMPathLocal & OMCSessionRunner * OMPathBash & OMCSessionRunner * OMPathBash & OMCSessionRunner in docker * OMPathBash & OMCSessionRunner in WSL (not tested!)
reason: * it is only a test for OMC / not OMPython specific * furthermore, it is run automatically via cron job (= FMITest)
Yeah sounds good. |
Content (lots of changes / these will be splitted into several PRs if the general approach is approved):
Compared to PR #401 this solution:
|instead ofUnionFurther changes could do additional modifications such that the 3rd party packages (ZMQ) are not needed at all in the runner code path.
All tests are running without error / tested in https://github.com/syntron/OMPython/actions/runs/20865402893
Please comment!